package cn.moukou.dictator.vo;

import cn.moukou.dictator.pojo.relation.*;
import lombok.Data;

@Data
public class RelationVO {
    private Long id;
    private String relationType;
    private String relationLabel;
    private Long start;
    private String startName;
    private Long end;
    private String endName;

    public RelationVO(KVNODE_RELATION r) {
        this.id = r.getId();
        this.relationType = r.getRelationType();
        this.relationLabel = r.getRelationLabel();
        this.start = r.getStartNode().getId();
        this.end = r.getEndNode().getId();
        this.startName = r.getStartNode().getNodeName();
        this.endName = r.getEndNode().getNodeName();
    }

}
